<template>
	<view style="height: 100%">
		<!-- <image class="img72" src="https://wx.xtwaixie.com/img/succ1.png" /> -->
		<image class="img72" src="/static/icon/right.png" />
		<h2 class="db tc f18 c28 mt20" style="font-weight: bold;">提交成功</h2>
		<p class="f12 mt8 db tc c9d" style="line-height: 1.5;">为保证采供双方更高效对接，我们将尽快联系您确认并完善询价信息。请保持电话畅通，谢谢！</p>
		<!-- <p class="f12 mt8 db tc c9d">为保证采购双方更高效对接，我们将尽快联系您确认并完善询价信息。请保持电话畅通，谢谢！</p> -->
		<p class="f12 mt15 db tc c9d">审核时间：工作日9:00 - 18:00</p>
		<view class="interestBox" :style="{opacity:followType? 1 : 1}">
			<!-- <image src="https://wx.xtwaixie.com/img/y.png" mode="widthFix" class="interestImg"></image> -->
			<image src="@/static/success.png" mode="widthFix" class="interestImg" style="height: auto;"></image>
			<view class="interestBtn" @tap="goNexts()">
				添加采购商专属客服
			</view>
			<view class="interestTips">
				<!-- 免费开通新报价提醒功能 -->
			</view>
		</view>
		<navigator class="back-but" url="/pages/home/home" hover-class="none" open-type="reLaunch"
			style="background: #dcdcdc;">返回</navigator>
		<van-popup :show="showPopup" @close='showPopup = false' round custom-style='background:rgba(0,0,0,0);'>
			<view class="" style="display: flex;flex-direction: column;align-items: center;">
				<image :src="img_path + img" mode="widthFix" style="width: 600rpx;" :round='true'
					:show-menu-by-longpress="true"></image>
			</view>

		</van-popup>
	</view>
</template>

<script>
	import http from '../../utils/http';
	// pages/demand/subSuccess.js
	export default {
		data() {
			return {
				img_path: http.img_path,
				showPopup: false,
				followType: false,
				img:''
			}
		}, // goMy() {
		// 	if (this.data.type == 0) {
		// 		wx.navigateTo({
		// 			url: '/pages/home/home',
		// 		})
		// 	} else if (this.data.type == 1 || this.data.type == 2) {
		// 		wx.navigateTo({
		// 			url: '/pages/my/my',
		// 		})
		// 	}

		// },

		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad(options) {
			// this.setData({
			// 	type: options.type || 0
			// })
			// if (options.type == 1) {
			// 	wx.setNavigationBarTitle({
			// 		title: '分享提交',
			// 	})
			// } else if (options.type == 2) {
			// 	wx.setNavigationBarTitle({
			// 		title: '成为刀具供应商',
			// 	})
			// }
		},
		/**
		 * 生命周期函数--监听页面初次渲染完成
		 */
		onReady() {},
		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow() {
			http.request('user/getSubscribe')
				.then((res) => {
					this.followType = res.data.data
				})
				.catch((res) => {
					uni.showToast({
						title: res.message,
						icon: 'none'
					});
				});
			http.request('base/configData')
				.then((res) => {
					this.img = res.data.xtwxcggl
					this.showPopup = true
				})
				.catch((res) => {
					console.log(res);
				});
		},
		/**
		 * 生命周期函数--监听页面隐藏
		 */
		onHide() {},
		/**
		 * 生命周期函数--监听页面卸载
		 */
		onUnload() {},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh() {},
		/**
		 * 页面上拉触底事件的处理函数
		 */
		onReachBottom() {},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage() {},
		methods: {
			goNexts() {
				this.showPopup = true
			},
		}
	};
</script>
<style lang="scss">
	@import './subSuccess.css';

	.codeView {
		text-align: center;
		width: 350rpx;
		font-size: 24rpx;
		padding-bottom: 20rpx;
	}

	.interestBox {
		background-color: #ECEAEB;
		display: flex;
		align-items: center;
		flex-direction: column;
		border-radius: 10rpx;
		padding: 20rpx 0;
		margin: 100rpx 0;

		.interestImg {
			width: 100rpx;
			margin-bottom: 20rpx;
		}

		.interestBtn {
			width: 300rpx;
			border-radius: 10rpx;
			background-color: #00CD68;
			text-align: center;
			line-height: 60rpx;
			font-size: 28rpx;
			color: #FFF;
			margin-bottom: 5rpx;
		}

		.interestTips {
			font-size: 24rpx;
			color: #575556;
		}
	}
</style>